package com.huibur.devicecheck.controller;

import com.huibur.devicecheck.model.test.Photo;
import com.huibur.devicecheck.model.vo.UserVO;
import com.huibur.devicecheck.request.ObjRes;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@RestController
@RequestMapping("/photo")
public class PhotoController {
    @ApiOperation(value = "查询图片",response = ObjRes.class)
    @GetMapping("/query")
    public ObjRes<Photo> query(@RequestParam String name){
            Photo p1=new Photo("zz","123");
            Photo p2=new Photo("jj","456");
            Map<String,Photo> map1=new HashMap<>();

            map1.put("zz",p1);
            map1.put("jj",p2);
            Photo p3=map1.get(name);
            return new ObjRes<Photo>().data(p3);
    }

}

